#!/bin/bash

content=$(cat source)

echo G00 X0.0 Y0.0 Z0.0 > $2
for ((i=0; $i < $1; i++))
do
echo -e "G91\n" \
	"G00 Z5.0\n" \
	"G90\n" \
	"(#OBJECT object_$i)\n" \
	"$content\n" \
	"(#!OBJECT object_$i)" >> $2
done

